package com.klun.designMode.strategy;

import java.util.Arrays;

public class StrategyTest {
    public static void main(String[] args) {
        //对double数组排序
        double[] doubleArray = {9.9, 8.8, 7.7, 6.6, 5.5, 4.4, 3.3, 2.2, 1.1, 0.0};
        BubbleSorter<double[]> doubleBubbleSorter = new BubbleSorter<>(new DoubleBubbleHandler());
        int operations = doubleBubbleSorter.sort(doubleArray);
        System.out.println("[Strategy] operations:" + operations + ", array:" + Arrays.toString(doubleArray));

    }
}
